package com.lingyue.commons.enums.excel;

import com.lingyue.commons.enums.CommEnum;

/**
 * @author DING DONG
 * @date 2020/2/220:55
 * @since 1.0
 */
public enum ExcelEnum implements CommEnum<Object> {
    /**
     * 线索跟进客户是否接通
     */
    CONNECTED("Y", "是"),
    UNCONNECTED("N", "否"),
    /**
     * 线索跟进联系人类型
     */
    OWNER("O", "车主"),
    AFTER_SALES_CONTACT("A", "售后联系人"),
    BOTH("B", "车主/售后联系人"),
    NULL("N", "其他类型联系人"),
    /**
     * 成交类型或支付类型
     */
    FULL_PAYMENT(1, "全款"),
    BMW_FINANCE(2, "宝马金融"),
    OTHER_FINANCE(3, "其他金融"),
    NEW_CAR(4, "新车成交"),
    USED_CAR(5, "二手车成交"),
    /**
     * 外呼量
     */
    VOL_0("0","0"),
    VOL_1("1","1");


    private Object code;
    private String content;

    ExcelEnum(Object code, String content) {
        this.code = code;
        this.content = content;
    }

    @Override
    public Object getCode() {
        return code;
    }

    @Override
    public String getContent() {
        return content;
    }

    /**
     * 根据code获取内容
     *
     * @param code Enum Code
     * @return String Enum Content
     */
    public static String getMsg(Object code) {
        for (ExcelEnum item : values()) {
            if (item.getCode().equals(code)) {
                return item.getContent();
            }
        }
        return "";
    }
}
